<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
<%
	String bathPath = request.getContextPath();
	pageContext.setAttribute("bathPath", bathPath);
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>增加/修改</title>
<link rel="stylesheet" href="${bathPath}/frame/layui/css/layui.css">
<link rel="stylesheet" href="${bathPath}/frame/static/css/style.css">
<link rel="icon" href="${bathPath}/frame/static/image/code.png">
<link type="text/css" rel="stylesheet" href="${bathPath}/css/page.css"/>
<script type="text/javascript" src="${bathPath}/js/jquery-1.9.1.min.js" ></script>
<script type="text/javascript" src="${bathPath}/js/ajaxSessionOut.js" ></script>
<!-- 1    css资源 -->
<link rel="stylesheet" type="text/css" href="${bathPath}/js/jquery-easyui-1.4.2/themes/default/easyui.css">
<!-- 2    图标资源 -->
<link rel="stylesheet" type="text/css" href="${bathPath}/js/jquery-easyui-1.4.2/themes/icon.css"> 
<!-- 3    EasyUI的js包 -->
<script type="text/javascript" src="${bathPath}/js/jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
<!-- 4    本地语言 -->
<script type="text/javascript" src="${bathPath}/js/jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
<!-- layer -->
<link type="text/css" rel="stylesheet" href="${bathPath}/js/layer/skin/layer.css"/>
<script type="text/javascript" src="${bathPath}/js/layer/layer.js" ></script>
<!-- validation -->
<script type="text/javascript" src="${bathPath }/js/jquery-validation/jquery.validate.js"></script>

<script src="${bathPath }/js/quickui/libs/js/form/validationRule.js" type="text/javascript"></script>
<script src="${bathPath }/js/quickui/libs/js/form/validation.js" type="text/javascript"></script>
<script src="${bathPath}/frame/layui/layui.js" charset="utf-8"></script>
<style type="text/css">
.my-skin .layui-layer-btn a {
	background-color:#009688;
</style>
<script type="text/javascript">
$(function(){
	$(".datagrid-header-rownumber").html("序号"); //给第一列设置标题
});
function search(){
	//$('#dg').datagrid('load',getParam());
	var param=$("form").serialize();
	layer.confirm("保存成功", {btn: ['确定'], title: "提示",skin:"my-skin"}, function(){
		$.ajax({
			 type:"POST",
			 async:false,
			 dataType:JSON,
			 data:param,
		     url:"${bathPath}/aDKManageRole/insert.action",
		     success:function(data){
		    	 if(data!="SUCCESS"){
						layer.msg(data);
					}
		     }
		 });
		layer.close(layer.index);
		parent.location.reload();
	});
}
</script>
</head>
<body class="body">
<form class="layui-form layui-form-pane" action="" showOnMouseOver="false">
	<input type="hidden" name="id" value="${u.id}" >
	<table class="param_table">
		<tr>
			<td style="width:250px; padding:3px;">
				<div class="layui-form-item" style="margin-left:50px; margin-top: 10px">
       				<label class="layui-form-label" style="width:130px;">名称：</label>
       			<div class="layui-input-inline">
            			<input type="text" id="name" name="name" placeholder="请输入" value="${u.name}" vlay-verify="required" autocomplete="off" class="layui-input">
            		</div>
            	</div>
            </td>
		</tr>
	
   </table>
</form>
	<div class="layui-form-item">
        <button class="layui-btn site-demo-active layui-btn-sm" data-method="offset" lay-submit="" lay-filter="sub" style="margin-left:175px;" onclick="search()">保 存</button>
    </div>
</body>
</html>